<template>
	<view>
		<uni-top-tabbar :tabIndex="tabIndex" :tabBars="tabBars" @toggleToptab="toggleTab" selectedBottomColor="#E88807"
			selectedTextColor="#E88807" textColor="#000" bgColor="#ffffff"></uni-top-tabbar>
	</view>
</template>

<script>
	import UniTopTabbar from '@/components/uni-top-tabbar/uni-top-tabbar.vue'
	export default {
		data() {
			return {
				//将选中标签的索引绑定为tabIndex，以便后续的调用
				tabIndex: 0,
				//导航栏标签列表数组数据结构示例，name为必须属性
				tabBars: [{
					name: "阅读",
					id: 0
				}, {
					name: "图文",
					id: 1
				}, {
					name: "问答",
					id: 2
				}, {
					name: "视频",
					id: 3
				},{
					name: "小记",
					id: 4
				},{
					name: "55555",
					id: 5
				},{
					name: "66666",
					id: 6
				}]
			
		}
	},
	components:{UniTopTabbar },
	methods: {
		//点击导航栏标签改变当前索引
		toggleTab(index) {
			this.tabIndex = index
		}
	}

	}
</script>

<style>

</style>
